/************************************************************************
 * The code is owned by mainframer.cn and Shang Tao
 * Without aproval of mainframer.cn and Shang Tao, removing the copyright
 * infomation is regarded as invassion of proprietary copyright
 ***********************************************************************/
package com.mr.qa.form;

import java.util.Collection;
import java.util.Date;

import org.apache.struts.upload.FormFile;

public class QuestionForm extends BaseForm 
{
	private String id;
	private String title;
	private String content;
	private String addition;
	private String reference;
	private FormFile file;
	private Integer catId;
	private String state;
	private String[] pollItem;
	private Integer userId;
	//private Integer anonymous;//useless now
	private Integer viewCount;
	private Date date;
	private Integer totalCount;
	private Collection answers;
	private Collection comments;
	
        private boolean isRequireLogin = false;//2008.4.11 isReqireLogin 
        
        //2008.10.19
        private String topLevel = "0";
        
        
        //when the answer.mrqa forwards to question.mrqa, id is the id of answer
        private String questionId;
        
        private String cat1Id;
        private String cat2Id;
        private String cat3Id;
        
    private FormFile image;
    private String imageIn;
    private String imageArea;
    private Integer categoryType;
    
    private boolean titleIsBold;
    private Integer titleColor = 0;// 0:nothing 1:red 2:blue
    private String[] cities;
    private String email;
    
	public String getAddition() {
		return addition;
	}
	public void setAddition(String addition) {
		this.addition = addition;
	}
	
	public java.util.Collection getAnswers() {
		return answers;
	}
	public void setAnswers(java.util.Collection answers) {
		this.answers = answers;
	}
	
	public Integer getCatId() {
		return catId;
	}
	public void setCatId(Integer catId) {
		this.catId = catId;
	}
	public java.util.Collection getComments() {
		return comments;
	}
	public void setComments(java.util.Collection comments) {
		this.comments = comments;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public FormFile getFile() {
		return file;
	}
	public void setFile(FormFile file) {
		this.file = file;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	/*
	public Integer getAnonymous() {
		return anonymous;
	}
	public void setAnonymous(Integer anonymous) {
		this.anonymous = anonymous;
	}
        */
	public String[] getPollItem() {
		return pollItem;
	}
	public void setPollItem(String[] pollItem) {
		this.pollItem = pollItem;
	}
	public String getReference() {
		return reference;
	}
	public void setReference(String reference) {
                if(reference != null)
                    if("http://".equals(reference.toLowerCase().trim()))
                        this.reference = "";
                    else 
        		this.reference = reference;
                else
                    this.reference = "";
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Integer getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(Integer totalCount) {
		this.totalCount = totalCount;
	}
	
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public Integer getViewCount() {
		return viewCount;
	}
	public void setViewCount(Integer viewCount) {
		this.viewCount = viewCount;
	}

    public void setCat1Id(String cat1Id)
    {
        this.cat1Id = cat1Id;
    }
    
    public String getCat1Id()
    {
        return cat1Id;
    }
    
    public void setCat2Id(String cat2Id)
    {
        this.cat2Id = cat2Id;
    }
    
    public String getCat2Id()
    {
        return cat2Id;
    }
    
    public void setCat3Id(String cat3Id)
    {
        this.cat3Id = cat3Id;
    }
    
    public String getCat3Id()
    {
        return cat3Id;
    }

    public void setQuestionId(String questionId)
    {
        this.questionId = questionId;
    }
    
    public String getQuestionId()
    {
        return questionId;
    }

    public void setIsRequireLogin(boolean isRequireLogin)
    {
        this.isRequireLogin = isRequireLogin;
    }
    
    public boolean getIsRequireLogin()
    {
        return isRequireLogin;
    }

	public void setTopLevel(String topLevel) {
		this.topLevel = topLevel;
	}

	public String getTopLevel() {
		return topLevel;
	}

	public FormFile getImage() {
		return image;
	}

	public void setImage(FormFile image) {
		this.image = image;
	}
	
	public String getImageIn() {
		return imageIn;
	}
	
	public void setImageIn(String imageIn) {
		this.imageIn = imageIn;
	}
	public String getImageArea() {
		return imageArea;
	}
	public void setImageArea(String imageArea) {
		this.imageArea = imageArea;
	}
	public Integer getCategoryType() {
		return categoryType;
	}
	public void setCategoryType(Integer categoryType) {
		this.categoryType = categoryType;
	}
	public boolean isTitleIsBold() {
		return titleIsBold;
	}
	public void setTitleIsBold(boolean titleIsBold) {
		this.titleIsBold = titleIsBold;
	}
	public Integer getTitleColor() {
		return titleColor;
	}
	public void setTitleColor(Integer titleColor) {
		this.titleColor = titleColor;
	}
	public String[] getCities() {
		return cities;
	}
	public void setCities(String[] cities) {
		this.cities = cities;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	
	
}
